{include file="public/header" /}
<body>
<div class="x-body layui-anim">
    <form class="layui-form" id="form" action="{:url('save')}">
        <input type="hidden" name="id" value="{$Request.param.id}">
        <input type="hidden" name="pid" value="{$Request.param.pid|default=0}">
        {include file="public/arguments" /}
        {if $p_title }
        <div class="layui-form-item">
            <label class="layui-form-label">上级分类</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" value="{$p_title}" disabled="disabled"/>
            </div>
        </div>
        {/if}
        <div class="layui-form-item">
            <label class="layui-form-label">分类名称</label>
            <div class="layui-input-inline">
                <input type="text" name="title" placeholder="请输入分类名称" lay-verify="required" lay-reqtext="请输入分类名称" lay-verType="tips"
                       class="layui-input" value="{$info?$info.title:''}"/>
            </div>
        </div>
        {if !$p_title }
        <div class="layui-form-item">
            <label class="layui-form-label">图标</label>
            {table:alone view='items/img' info='$info' form='$form'/}
        </div>
        {/if}

        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-inline">
                <input type="text" name="sort" autocomplete="off" lay-verify="required" lay-reqtext="请填写排序" lay-verType="tips"
                       placeholder="请输入排序，越小越靠前" class="layui-input"
                       value="{$info?$info.sort:''}">
            </div>
        </div>

    </form>
    <div class="layui-form-item layui-layout-admin">
        <div class="layui-input-block">
            <div class="layui-footer" style="left: 0;">
                <button class="layui-btn"lay-filter="save" lay-submit formObj="#form">保存
                </button>

            </div>
        </div>
    </div>
</div>
</body>
{include file="public/footer" /}

</html>